import { User, UserVO, UserDTO } from './model/userModel';
import { defHttp } from '/@/utils/http/axios';

enum Api {
  List = '/sys/user/list',
  Save = '/sys/user/save',
  Del = '/sys/user',
}

// 菜单树
export const list = (params?: UserVO) => defHttp.post<UserDTO>({ url: Api.List, params });

// 保存
export const save = (params: User) => defHttp.post<User>({ url: Api.Save, params });

// 删除
export const del = (params: { ids: String }) =>
  defHttp.delete<boolean>({ url: Api.Del + `/${params.ids}` });

